package cn.edu.bjtu.toychange.service.impl;

import cn.edu.bjtu.toychange.entity.Requisition;
import cn.edu.bjtu.toychange.service.RequisitionService;
import cn.edu.bjtu.toychange.dao.RequisitionDao;

public class RequisitionServiceImpl implements RequisitionService{
	private RequisitionDao requisitionDao;
	
	public RequisitionServiceImpl() {
		requisitionDao = new RequisitionDao();
	}
	
	@Override
	public boolean insertRequisition(Requisition requisition) {
		// TODO Auto-generated method stub

		return requisitionDao.saveRequisition(requisition);
	}
	
	@Override
	public boolean updateRequisition(Requisition requisition) {
		// TODO Auto-generated method stub
		
		return requisitionDao.saveRequisition(requisition);
	}

	@Override
	public void deleteRequisition(int requisitionID) {
		// TODO Auto-generated method stub
		
		requisitionDao.deleteRequisition(requisitionID);
	}

	@Override
	public Requisition getRequisition(int requisitionID) {
		// TODO Auto-generated method stub
		
		return requisitionDao.getRequisition(requisitionID);
	}

	@Override
	public boolean dealRequisition(int requisitionID, boolean deal) {
		// TODO Auto-generated method stub
		
		return requisitionDao.dealRequisition(requisitionID, deal);
	}

}
